package com.punai.standard.controller;

import com.punai.common.core.controller.BaseController;
import com.punai.common.core.domain.AjaxResult;
import com.punai.standard.service.IStaFbChapterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/sta/fbChapter")
public class StaFbChapterController extends BaseController {
    @Autowired
    private IStaFbChapterService staFbChapterService;

    @PreAuthorize("@ss.hasPermi('sta:fbfee:list')")
    @GetMapping("/getSpecialtyList")
    public AjaxResult getSpecialtyList()
    {
        return AjaxResult.success(staFbChapterService.getSpecialtyList(getCompanyId()));
    }

    @PreAuthorize("@ss.hasPermi('sta:fbfee:list')")
    @GetMapping("/getVersionList/{specId}")
    public AjaxResult getVersionList(@PathVariable String specId)
    {
        return AjaxResult.success(staFbChapterService.getVersionListBySpecId(getCompanyId(),specId));
    }
}
